<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #main {
            width: 220px;
            height: 300px;
            border: 1px solid black;
            display: flex;
            align-items: flex-start;
        }

        #main div {
            flex: 1;
        }

        #myBlueDiv {
            align-self: center;
        }
    </style>
</head>

<body>
    <div id="main">
        <div style="background-color:red;">1</div>
        <div style="background-color:red;" id="myBlueDiv">2</div>
        <div style="background-color:red;">3</div>
    </div>
</body>

</html>